package com.company;

public class test01 {
    public static void main(String[] args) {
        Integer[] a={1,2,3,4,5};
        Double[] b={1.1,2.2,3.3,4.4,5.5};
        String[] s={"angerlababy","迪丽热巴","辛巴","杨幂","小龙女","月神"};
        perint(a);
        perint(b);
        perint(s);

       // perint1(a);
       // perint2(b);
       // perint3(s);

    }
   /*  public static void perint(Integer[] a){
        for (int i=0;i< a.length;i++){
            System.out.println(a[i]);
        }
    }
    public static void perint1(Integer[] a){
        for (Integer in:a){
            System.out.println(in);
        }
    }
   public static void perint2(Double[] d){
        for (Double dd:d){
            System.out.println(dd);
        }
   }
   public static void perint3(String[] s){
        for (String ss:s){
            System.out.println(ss);
        }
   } */


    //用泛型解决 只需要一次
public  static<E> void perint(E[] e){
    for (E e1:e ){
        System.out.println(e1);
    }
}
}
